using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using jcs.Biz.SSManager;
using jcs.Ifc.SSManager;
using System.Collections.Generic;
using jcs.Core.SSManager;

namespace jcs.Biz.SSManager.Tests
{
    [TestClass]
    public class SnapshotControllerTests
    {

        private const string TestSnapShotName = "SnapshotTest";
        private const string TestSnapshotExtension = "_snap";

        [TestMethod]
        public void ExistingSnapshotsTest()
        {
            var controller = jcs.Biz.SSManager.Factory.GetSnapshotController();
            Assert.AreNotEqual(null, controller);
            var snapshots = controller.ExistingSnapshots;
            Assert.AreNotEqual(null, snapshots);
            Assert.AreNotEqual(0, snapshots.Count);
        }

        [TestMethod]
        public void CreateSnapshotTest()
        {
            var controller = Factory.GetSnapshotController();
            var snap = Core.SSManager.Factory.GetSnapshot(snapShotName: TestSnapShotName, logicalFileName: "", filePath: "", extension: TestSnapshotExtension, creationTime: System.DateTime.Now);
            Assert.AreEqual(true, controller.CreateSnapshot(snap, TestSnapshotExtension));
        }

        [TestMethod]
        public void DeleteSnapshotsTest()
        {
            var controller = jcs.Biz.SSManager.Factory.GetSnapshotController();
            //List<string> names = new List<string>();
            //names.Add(_TEST_SNAP_NAME);
           // Assert.AreEqual(true, Controller.DeleteSnapshots(names));
        }

    }
}